//
//  CNKIPublishBtn.m
//  CNKICommunity
//
//  Created by wei on 17/2/9.
//  Copyright © 2017年 CNKI. All rights reserved.
//

#import "CNKIPublishBtn.h"



@implementation CNKIPublishBtn

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        [self setUp];
    }
    return self;
}
-(void)setUp
{
    self.titleLabel.textAlignment = 1;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    //修改按钮内部布局
    self.imageView.x = 0;
    self.imageView.y = 0;
    self.imageView.width = self.width;
    self.imageView.height = self.width;
    
    self.titleLabel.x = 0;
    self.titleLabel.y = self.imageView.height;
    self.titleLabel.width = self.width;
    self.titleLabel.height = self.height - self.imageView.height;
}
@end
